﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Urbania.GUI.Elements
{
    public class TileSelectionBox : GUI.Elements.RightClickMenu
    {
        private Color bgColor;
        private Rectangle bounds;
        private SpriteFont font;
        private Vector2 position;
        private World.Tile o;

        public TileSelectionBox()
        {
            this.position = Vector2.Zero;
            this.bgColor = Color.Blue;
            this.Generate();
        }

        public TileSelectionBox(Vector2 position, World.Tile o)
        {
            this.position = position;
            this.bgColor = Color.Blue;
            this.o = o;
            this.Generate();
        }

        public TileSelectionBox(Vector2 position, Color bgColor)
        {
            this.position = position;
            this.bgColor = bgColor;
            this.Generate();
        }

        public void Generate()
        {
            foreach (string s in World.TileTypeHelperClass.TileTypeNames)
            {
                rightClickItems.Add(new RightClickWorldObject(s));
            }

            this.bounds = new Rectangle((int)this.position.X, (int)this.position.Y, (int)font.MeasureString("Homeless Shelter").X, (int)font.MeasureString("Homeless Shelter").Y);
        }

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            base.Draw(gameTime, spriteBatch);
        }
    }
}
